home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- *
- * NSSDC/CDF Header file for SkeletonTable.
- *
- * Version 1.0, 25-Feb-92, ST Systems (STX)
- *
- * Modification history:
- *
- * V1.0 25-Feb-92, J Love Original version.
- *
- ******************************************************************************/
-
- /******************************************************************************
- * Positions/widths.
- ******************************************************************************/
-
- #define MAX_LINE_LEN 78
- #define MAX_COL_TO_USE (MAX_LINE_LEN - 1)
- #define ENTRY_NUM_COL 20
- #define ENTRY_NUM_WIDTH 5
- #define VAR_DATATYPE_COL 20
- #define ENTRY_DATATYPE_COL 20
- #define VAR_NUMELEMS_WIDTH 5
-
- /******************************************************************************
- * Function Prototypes.
- ******************************************************************************/
-
- #if defined(vms) | defined(__MSDOS__)
- void WriteHeader (char *);
- void WriteGlobalAttr (void);
- void WriteVarAttr (void);
- void WriteVar (enum NRVlocENUM);
- void WriteEnd (void);
- void WriteNRVdata (FILE *, long, long, long, long *);
- char *DataType (long);
- void StatusHandler (CDFstatus);
- #endif
-
- #if defined(unix)
- void WriteHeader ();
- void WriteGlobalAttr ();
- void WriteVarAttr ();
- void WriteVar ();
- void WriteEnd ();
- void WriteNRVdata ();
- char *DataType ();
- void StatusHandler ();
- #endif
-
- /******************************************************************************
- * Enumerators.
- ******************************************************************************/
-
- enum NRVlocENUM {noNRV, NRVinSKT, NRVinNRV};
-
- /******************************************************************************
- * Increment to next set of indices, column majority.
- ******************************************************************************/
-
- #define INCRindicesCOL(numDims,dimSizes,indices) { \
- int _z_; \
- for (_z_ = 0; _z_ < numDims; _z_++) { \
- if (indices[_z_] == dimSizes[_z_] - 1) \
- indices[_z_] = 0; \
- else { \
- indices[_z_]++; \
- break; \
- } \
- } \
- }
- /******************************************************************************
- * Increment to next set of indices, row majority.
- ******************************************************************************/
-
- #define INCRindicesROW(numDims,dimSizes,indices) { \
- int _z_; \
- for (_z_ = numDims - 1; _z_ >= 0; _z_--) { \
- if (indices[_z_] == dimSizes[_z_] - 1) \
- indices[_z_] = 0; \
- else { \
- indices[_z_]++; \
- break; \
- } \
- } \
- }
-